using System;
using System.Collections.Generic;
using System.Linq;

namespace Windy.OpenLink.ObjectPools
{
    public interface IDynamicHierarchyObjectPool : IObjectPool
    {
        void AddSubPool(string path, IObjectPool subPool);

        bool RemoveSubPool(string path, RemoveSubPoolOptions options = RemoveSubPoolOptions.RemoveSubPoolObjects);

        TPool GetSubPool<TPool>(string path)
            where TPool : class, IObjectPool;

        IEnumerable<string> SubPoolPaths { get; }

        int SubPoolCount { get; }

        bool HasSubPool(string path);
    }
}
